home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr48
/
tpsecure.zip
/
TEST.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1993-04-17
|
1KB
|
53 lines
(* TO RUN: RUN 1 TIME WITH PARAMSTRING OF "/SCOOBYDOO"
RUN MANY TIMES WITH NO PARAMSTRING
EXPERIMENT!
Feel free to change the password or any code you want (keep the original around
for screw ups).
This code may be freely used and abused to the programmers liking.
Jason J. Weaver 03/09/92
*)
program test;
uses Secure;
var Security : TSecurity;
{---UPPER--------------------------------------------------------------------}
Function Upper(Strn:String):String;
Var I : Byte;
S : String;
begin
S := '';
For I := 1 to Length(Strn) do
S := S + UpCase(Strn[I]);
Upper := S;
end;
begin
With Security do
begin
init('test.exe'); { INITALIZE AND SECURE THIS PROGRAM }
if Upper(ParamStr(1)) = '/SCOOBYDOO' { ONLY ALLOW SETUP ON PASSWORD }
then Setup(0,5); { PASSWORD DETECTED, SO RUN SETUP, ALLOWING
6 ACCESSES TO THE PROGRAM }
if Not ValidUser
then begin
Writeln('Access denied: ',ErrorStr(ErrorCode));
end
else begin
Writeln('Access granted');
end;
if ErrorCode <> 0
then Writeln('Run: TEST /SCOOBYDOO'); { GIVE SERIOUS HINT HOW TO
RESET THE COUNT }
Done;
end;
end.